
<?php include_once 'common/header.php';  ?>
<!-- admin_main -->
<div class="admin_main">
	<!-- Admin_top end -->
	<?php include_once 'common/borrow_left.php';  ?>
	<!-- Admin_Left End -->
	<div class="admin_right">
		<div class="admin_right_title">
			<strong>贷款管理</strong> &gt;&gt; 复审
		</div>
		<div class="admin_borrow">
			<table border="0" cellspacing="1" cellpadding="0" bgcolor="#f0f0f0" width="100%">
			  <tr>
				<td bgcolor="#FFFFFF">标题：<?php echo $borrow['title'];?></td>
				<td bgcolor="#FFFFFF">标种：<font><?php echo $borrow_type[$borrow['ftype']];?></font></td>
				<td bgcolor="#FFFFFF">期限：<?php if($borrow['is_day'] == 1){echo $borrow['time_limit_day'].'天'; }else{echo $borrow['time_limit'].'个月';}?></td>
				</tr>
			  <tr>
				<td bgcolor="#FFFFFF">金额：<font><?php echo number_format($borrow['account'],2);?></font></td>
				<td bgcolor="#FFFFFF">利率：<font><?php echo $borrow['apr'];?>%</font></td>
				<td bgcolor="#FFFFFF">还款方式：<?php echo $borrow_style[$borrow['style']];?></td>
				</tr>
			  <tr>
				<td bgcolor="#FFFFFF">最小投标金额：<?php echo number_format($borrow['lowest_account'],2);?></td>
				<td bgcolor="#FFFFFF">最大投标金额：<?php echo number_format($borrow['most_account'],2);?></td>
				<td bgcolor="#FFFFFF">状态：
				<?php if($borrow['fstatus'] == 1 && $borrow['account_yes'] == $borrow['account']){?>
				<font style="color:blue">投资已满</font></td>
				<?php }else{?>
					<?php echo $borrow_status[$borrow['fstatus']];?>
				<?php }?>
				</tr>
              <tr>
              	<td bgcolor="#FFFFFF">是否奖励：<?php if($borrow['award'] == 2){?>按投标金额奖励<?php }else{?>不奖励<?php }?></td>
			  	 <td bgcolor="#FFFFFF" colspan="2" ><?php if($borrow['award'] == 2){?>奖励比例：<font><?php echo $borrow['funds'];?>%</font><?php }?></td>
				</tr>
              <tr>
				<td bgcolor="#FFFFFF"  colspan="3">用途：<?php echo $borrow_use[$borrow['fuse']];?></td>
				</tr>
				 <tr>
				<td colspan="3" bgcolor="#FFFFFF">内容：<?php echo $borrow['content'];?></td>
				</tr>
				<form action="/ychadmin/borrow/edit/" method="post" id="borrowForm" name="borrowForm">
			<input type="hidden" id="borrow_id" name="borrow_id" value="<?php echo $borrow['id'];?>" />
              <tr>
				<td colspan="3" bgcolor="#FFFFFF">状态：<input type="radio" name="fstatus" id="fstatus" value="3" checked="checked"/>复审通过 <input type="radio" name="fstatus" id="fstatus" value="4" />复审不通过 </td>
				</tr>
              <tr>
				<td colspan="3" bgcolor="#FFFFFF" style="padding:10px">备注：<textarea rows="8" cols="100" id="repayment_remark" name="repayment_remark">复审通过</textarea></td>
				</tr>
			</table>
<div style="overflow:hidden;width:99%;margin:10px 0;text-align:center;"><input type="button" onclick="borrow_submit();" value="提交" class="positive" />	</div>
</form>			

			
					
			
			
			</div>
	</div>
<!-- Admin_Right End -->
</div>
<!-- admin_main end -->
<script type="text/javascript">
function borrow_submit(){
	$.ajax({
		type: "POST",
		url: "/ychadmin/borrow/review/",
		data: "id="+$('#borrow_id').val()+"&fstatus="+$('input[name="fstatus"]:checked').val()+"&repayment_remark="+$('#repayment_remark').val(),
		success: function(msg){
	        $("#dialog" ).dialog();
	        if(msg == 1){
	        	$("#msg").html("审核成功！");
	        }else{
				$("#msg").html("审核失败，请联系管理员！");
	        }
			setTimeout(function(){
				window.close();
			},3000);
		},
		dataType: "text"
	});
}
</script>
<div id="dialog" title="系统提示" style="display:none"><p id="msg" style="text-align:center"></p></div>
</body>
</html>
